package com.jic.member.api.rest;

import com.jic.common.base.vo.RestResult;
import com.jic.member.request.UserAddrRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.io.IOException;

@FeignClient(name = "jic-member",path = "/memberAddress")
public interface MemberAddressApi {

    /**
     *
     *
     * @description: 查询用户收货地址
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 22:31
     */
    @PostMapping("searchUserAddrList")
    RestResult<?> searchUserAddrList(String token) throws IOException;


    /**
     *
     *
     * @description: 查询用户默认收货地址
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 22:31
     */
    @PostMapping("searchUserAddr")
    RestResult<?> searchUserAddr(@RequestBody UserAddrRequest userAddrRequest) throws IOException;


    /**
     *
     *
     * @description: 添加用户收货地址
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 22:36
     */
    @PostMapping("addUserAddr")
    RestResult<?> addUserAddr(@RequestBody UserAddrRequest userAddrRequest) throws IOException;

    /**
     *
     *
     * @description: 修改用户收货地址
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 22:38
     */

    RestResult<?> updateUserAddr(@RequestBody UserAddrRequest userAddrRequest) throws IOException;


    /**
     *
     *
     * @description: 删除用户收货地址
     * @return:
     * @author: fengrui
     * @time: 2020/12/09 22:43
     */
    RestResult<?> deleteUserAddr(@RequestBody UserAddrRequest userAddrRequest) throws IOException;


    /**
     *
     *
     * @description:
     * @return:
     * @author: fengrui
     * @time: 2020/12/10 09:18
     */
    RestResult<?> getAdminAddress(@RequestBody UserAddrRequest userAddrRequest) throws IOException;
}
